package nl.infodation.emr.pricingservice.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedNativeQuery;

@NamedNativeQuery(name="findSystemDetail", query="" +
	" SELECT  svref.id, svref.system_value_id, svref.label, sv.system_code" +
	" FROM system_value_ref svref, system_value sv,system_value_role svrole,role r" + 
	" WHERE svref.system_value_id=sv.id " +
	" AND svrole.system_value_id=sv.id " +
	" AND svrole.role_id=r.role_id " +
	" AND r.role_name=? " +
	" AND svref.language_id=? " +
	" AND sv.system_name=?" +
	" ORDER BY sv.system_name, svref.label", resultClass=SystemDetail.class)
@Entity
public class SystemDetail {
	
	public static final String QUERY_NAME = "findSystemDetail";

	@Id
	@Column(name = "id")
	private Integer id;
	
	@Column(name = "system_value_id")
	private Integer systemValueId;
	
	@Column(name = "label")
	private String label; 
	
	@Column(name = "system_code")
	private String systemCode;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getSystemValueId() {
		return systemValueId;
	}

	public void setSystemValueId(Integer systemValueId) {
		this.systemValueId = systemValueId;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public String getSystemCode() {
		return systemCode;
	}

	public void setSystemCode(String systemCode) {
		this.systemCode = systemCode;
	}
	
}
